import { UserConstant } from "@/common/Constant";
import type { tokenInfo } from "@/typedefined/User";

/**
 * @description 清除token
 */
export function removeToken(){
    localStorage.removeItem(UserConstant.tokenName);
    localStorage.removeItem(UserConstant.tokenValue);
}

/**
 * @description 设置token
 * @param token token实例
 */
export function setToken(token:tokenInfo){
    localStorage.setItem(UserConstant.tokenName,token.tokenName);
    localStorage.setItem(UserConstant.tokenValue,token.tokenValue);
}
